// components/AnswerDtl/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    AnswerShow: Boolean,
    ReturnShow: {
      type: Boolean,
      value: true
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    datas: [{
        title: 'TOEFL 7月早练团-单日“词汇团”',
        type: 0,
        details: '*(单选)',
        items: [{
            name: 'A',
            value: 'A'
          },
          {
            name: 'B',
            value: 'B'
          }
        ],
      },
      {
        title: 'TOEFL 7月早练团-单日“词汇团”',
        type: 1,
        details: '*(多选)',
        items: [{
          name: 'A',
          value: 'A'
        },
        {
          name: 'B',
          value: 'B'
        }
        ],
      },
    ],

    num: [],
    AllowModalDatas: [],
  },

  /**
   * 组件的方法列表
   */
  methods: {
    final:function(e){
      console.log(e)
      wx.switchTab({
        url: '/pages/index/index'
      })
    },
    radioChange: function(e) {
      console.log(e.currentTarget.dataset)
    },
    checkboxChange: function(e) {
      console.log(e)
    },
    AllowModal: function() {
      this.data.AnswerShow = true
      //自定义事件
      this.triggerEvent('AnswerShow', {
        Answershow: true
      }, {})
    }
  }
})